"""Qshop URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import path,re_path,include
from Store.views import *
from django.views.decorators.csrf import csrf_exempt
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register("morelist",MorelistView,basename="")   # 收集注册路由

# more_list = MorelistView.as_view(
#     {'get':'list'}
# )

urlpatterns = [
    path("api/",include(router.urls)),
    path('admin/', admin.site.urls),
    # path('morelist/', more_list),
    path('reqtest/', reqtest),
    path('index/', index),
    path('goods/', goods),
    path('login/', login),
    path('logout/', logout),
    path('register/', register),
    path('store/', store),
    path('orders/', orders),
    re_path('userinfo/(?P<id>\d){1,100}/', userinfo),
    path('statistics_goods/', statistics_goods),
    path('statistics_orders/', statistics_orders),
    path('set_cookie/', set_cookie),
    path('get_cookie/', get_cookie),
    path('delete_cookie/', delete_cookie),
    path('set_session/', set_session),
    path('get_session/', get_session),
    path('delete_session/', delete_session),
    path('test_form/', test_form),
    path('jsontest/', jsontest),
    path('ajaxtest/', ajaxtest),
    path('vuedemo/', vuedemo),
    path('list/', list),
    path('list_login/', list_login),
    path('list_login1/', list_login1),
    path('fundemo/', csrf_exempt(fundemo)),
    path('goodsview/', csrf_exempt(GoodsView.as_view())),
    # path('morelist/', MorelistView.as_view()),
    path('userlist/', QuserlistView.as_view()),
    # path('add_goods/', add_goods),
]
